import React, { useDebugValue, useState } from 'react'


// 自定义 hooks
function useMyHooks(value) {

    useDebugValue(value ? 'Online' : 'Offline');


    return value
}


const Box = () => {

    const is = useMyHooks(true)
    const [count, setcount] = useState(100)
    return <h1>Box</h1>
}

export default function App() {

    const is = useMyHooks(false)

    const [count, setcount] = useState(100)
    return (
        <div>
            {count}
            <Box />
        </div>
    )
}
